The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent it is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
Two-dimensional (2D) stroke rendering can be achieved in modern graphics processing units (GPUs) by generating extrusion polygons along a centerline. For continuity and scaling without aliasing, texturing can be used to blend (anti-alias), apply patterns along the length of the stroke, or stencil the stroked lines. In general, texturing hardware in the GPUs limits the width and height of textures. A stroke that is longer in window-space coordinates than the maximum allowable texture width of the GPU requires that the pattern encoded in the texture repeats. This repetition is trivial when the length of the pattern is power-of-two (POT), as measured in texture pixels (“texels”). This is so because modern GPUs allow a so-called repeat mode such that if the normalized texture coordinate space is exceeded, the GPU will perform a modulo (1.0) operation (remainder is always the mantissa of the original texture coordinate value) on the texture coordinates, resulting in a repeating effect on the texture coordinate space. This effect allows repetition of a pattern along the length of the stroke. However, when the length of the pattern is a not-power-of-two (NPOT), many GPUs do not support texture repetition.